home *** CD-ROM | disk | FTP | other *** search
- /*
- Visual FX
- For
- Image FX
- SetUp Script
- Written By J.L. White
-
- (C)1997 Merlin's Software
-
- */
-
- parse arg Num Frames
- options results
- address "IMAGEFX.1"
- Quotes = '22'X
- ReDraw On
- RequestResponse "Do You Need Instructions?"
- if rc = 0 then do
- call Docs()
- end
- if exists("libs:flyer.library") then do
- if (POS('PROJECT_REXX_PORT',SHOW('Ports')) =0) then do
- RequestNotify 'Flyer Must Be Running First!'
- exit
- end
- call OpenFlyStuff()
-
-
- Gadget.1 = 'D/135/22/120/Main Image Type/4/FLYER CLIP/FLYER STILL/FRAME/SEQUENCE'
- ComplexRequest '"Visual FX SetUp Options"' 1 Gadget 280 60
- if rc ~= 0 then do
- call CloseStuff()
- exit 0
- end
- else do
- IAType = RESULT.1
- end
-
- call GetA()
-
-
- Gadget.1 = 'D/135/22/120/2nd Image Type/4/FLYER CLIP/FLYER STILL/FRAME/SEQUENCE'
- ComplexRequest '"Visual FX SetUp Options"' 1 Gadget 280 60
- if rc ~= 0 then do
- call CloseStuff()
- exit 0
- end
- else do
- IBType = RESULT.1
- end
- call GetB()
- end
- else do
- Gadget.1 = 'D/135/22/120/Main Image Type/2/FRAME/SEQUENCE'
- ComplexRequest '"Visual FX SetUp Options"' 1 Gadget 280 60
- if rc ~= 0 then do
- call CloseStuff()
- exit 0
- end
- else do
- IAType = RESULT.1+2
- end
-
- call GetA()
-
- Gadget.1 = 'D/135/22/120/2nd Image Type/2/FRAME/SEQUENCE'
- ComplexRequest '"Visual FX SetUp Options"' 1 Gadget 280 60
- if rc ~= 0 then do
- call CloseStuff()
- exit 0
- end
- else do
- IBType = RESULT.1+2
- end
-
- call GetB()
- end
-
- KillBrush
- i = Start
-
- ReDraw On
- LoadBuffer "VFXIFX:Images/Pics/Alphas.Pic" Force
- RequestNotify "Look At Examples For FileName Then Click "Quotes"Okay"Quotes""
-
- RequestFile '"Select File To Use For Alpha Template!" "VFXIFX:Images/Alphas" ""'
- ALName = result
-
-
- if FlyOn = 1 then
- call CloseStuff()
-
- call open TempFile,"VFXIFX:TempDrawer/"strip(Num),W
- call writeln TempFile,PicAName
- call writeln TempFile,Start
- call writeln TempFile,End
- call writeln TempFile,IAType
- call writeln TempFile,PicBName
- call writeln TempFile,StartB
- call writeln TempFile,EndB
- call writeln TempFile,IBType
- call writeln TempFile,ALName
- call close TempFile
- exit
-
-
-
- Docs:
- text1 = '"This effect uses a special template thats made"'
- text2 = '"out of a Black & White Image. Where White is used,"'
- text3 = '"it will be replaced by the 2nd image. Shades of"'
- text4 = '"grey will give you various levels of transparency."'
- text5 = '"We supply a number of images, but experiment on "'
- text6 = '"your own and see what you can come up with."'
-
- Gadget.1 = 'TEXT LE=10 TE=4 LB='text1' '
- Gadget.2 = 'TEXT LE=10 TE=14 LB='text2' '
- Gadget.3 = 'TEXT LE=10 TE=24 LB='text3' '
- Gadget.4 = 'TEXT LE=10 TE=34 LB='text4' '
- Gadget.5 = 'TEXT LE=10 TE=44 LB='text5' '
- Gadget.6 = 'TEXT LE=10 TE=54 LB='text6' '
- Gadget.7= 'END'
- NewComplexRequest '"Instructions For Effect #19"' Gadget 366 66
- return
-
-
- GetFile:
- parse Arg Title, Path
- Address FLY_1 SetString Path
- Address FLY_1 GetFileNameNT Title
- return result
-
- GetFileName: procedure
- ARG CompleteName
- c = lastpos("/",CompleteName)
- if c = 0 then c = lastpos(":",CompleteName)
- return substr(CompleteName, c + 1)
-
-
- GetA:
- if IAType = 0 then do
- call Switcher(TOSW)
- PicAName = GetFile("Select Flyer Clip For Main Image! ",DriveName)
- Name = GetFileName(PicAName)
- if Name = "" then do
- Address FLY_1 OK_TEXT " OK "
- Title = "You Must Enter A Valid Clip Name To Use!"
- Address FLY_1 FYINT Title
- Address FLY_1 Quit
- call Switcher(TOWB)
- exit
- end
- Address FLY_1 SetFileName PicAName
- Address FLY_1 GetClipLength PicAName
- End = result
- Start = 0
- Address FLY_1 Program "5"
- Address FLY_1 StartNum Start
- Address FLY_1 EndNum End
- Address FLY_1 CurrentNum "0"
- Address FLY_1 GetTimeNT "Select A Range Of Frames To Process!"
- Start = word(result,1)*2
- End = word(result,2)*2
- Start = Start + 1
- End = End +2
- call addlib('PROJECT_REXX_PORT' , 0)
- call addlib(TOASTERLIB,0)
- call Switcher(TOWB)
- address command "C:Wait 1"
- ScreenToFront
- end
- if IAType = 1 then do
- RequestFile '"Select Flyer Still For Main Image!"' DriveName ' '
- PicAName = result
- Name = GetFileName(PicAName)
- if Name = "" then do
- Title = "You Must Enter A Valid Name To Use!"
- RequestNotify Title
- if FlyOn = 1 then Address FLY_1 Quit
- exit
- end
- RequestNumber '"Enter Number Of Frames To Process!"' Frames
- End = result
- Start = 1
- end
- if IAType = 2 then do
- RequestFile '"Select FileName For Main Image!"' 'SYS:' ' '
- PicAName = result
- Name = GetFileName(PicAName)
- if Name = "" then do
- Title = "You Must Enter A Valid Name To Use!"
- RequestNotify Title
- if FlyOn = 1 then Address FLY_1 Quit
- exit
- end
- RequestNumber '"Enter Number Of Frames To Process!"' Frames
- End = result
- Start = 1
- end
- if IAType = 3 then do
- RequestFile '"Select BaseName For Main Image! "' 'SYS:' ' '
- PicAName = result
- Name = GetFileName(PicAName)
- if Name = "" then do
- Title = "You Must Enter A Valid Name To Use!"
- RequestNotify Title
- if FlyOn = 1 then Address FLY_1 Quit
- exit
- end
- RequestNumber '"Enter Number Of Frames To Process!"' Frames
- End = result
- Start = 1
- end
- DriveName = GetPathName(PicAName)
-
- return
-
-
- GetB:
- if IBType = 0 then do
- call Switcher(TOSW)
- PicBName = GetFile("Select Flyer Clip For 2nd Image! ",DriveName)
- Name = GetFileName(PicBName)
- if Name = "" then do
- Address FLY_1 OK_TEXT " OK "
- Title = "You Must Enter A Valid Clip Name To Use!"
- Address FLY_1 FYINT Title
- Address FLY_1 Quit
- call Switcher(TOWB)
- exit
- end
- Address FLY_1 SetFileName PicBName
- Address FLY_1 GetClipLength PicBName
- EndB = result
- StartB = 0
- Address FLY_1 Program "5"
- Address FLY_1 StartNum StartB
- Address FLY_1 EndNum EndB
- Address FLY_1 CurrentNum "-1"
- Address FLY_1 GetTimeNT "Select Frame To Start With For 2nd Image!"
- StartB = word(result,1)*2
- EndB = word(result,2)*2
- StartB = StartB + 1
- EndB = EndB +2
- call addlib('PROJECT_REXX_PORT' , 0)
- call addlib(TOASTERLIB,0)
- call Switcher(TOWB)
- address command "C:Wait 1"
- ScreenToFront
- end
- if IBType = 1 then do
- RequestFile '"Select Flyer Still For 2nd Image!"' DriveName ' '
- PicBName = result
- Name = GetFileName(PicBName)
- if Name = "" then do
- Title = "You Must Enter A Valid Name To Use!"
- RequestNotify Title
- if FlyOn = 1 then Address FLY_1 Quit
- exit
- end
- EndB = Frames
- StartB = 1
- end
- if IBType = 2 then do
- RequestFile '"Select FileName For 2nd Image!"' 'SYS:' ' '
- PicBName = result
- Name = GetFileName(PicBName)
- if Name = "" then do
- Title = "You Must Enter A Valid Name To Use!"
- RequestNotify Title
- if FlyOn = 1 then Address FLY_1 Quit
- exit
- end
- EndB = Frames
- StartB = 1
- end
- if IBType = 3 then do
- RequestFile '"Select BaseName For 2nd Image! "' 'SYS:' ' '
- PicBName = result
- Name = GetFileName(PicBName)
- if Name = "" then do
- Title = "You Must Enter A Valid Name To Use!"
- RequestNotify Title
- if FlyOn = 1 then Address FLY_1 Quit
- exit
- end
- EndB = Frames
- StartB = 1
- end
-
- return
-
-
- CloseStuff:
- Address FLY_1 Quit
- call remlib('ToasterARexx.port')
- call remlib('PROJECT_REXX_PORT')
- return
-
-
- OpenFlyStuff:
- FlyOn = 1
- address command "run VFXIFX:FLY"
- do while (POS('FLY_1',SHOW('Ports')) = 0)
- address command "wait 1"
- end
- TOASTERLIB="ToasterARexx.port"
- call remlib('ToasterARexx.port')
- call remlib('PROJECT_REXX_PORT')
- call addlib('PROJECT_REXX_PORT' , 0)
- call addlib(TOASTERLIB,0)
- DriveName = FindDrive()
- return
-
-
- FindDrive:
- address command "C:Info >RAM:DriveList"
- call open TempFile,"RAM:DriveList",R
- do until eof(TempFile)
- line = readln(TempFile)
- parse var line Drive" "Rest
- if Drive = "FA0:" then
- FlyVolume = word(Rest,7)":"
- end
- call close TempFile
- address command "Delete >NIL: RAM:DriveList"
- return FlyVolume
-
- GetPathName: procedure
- parse ARG CompleteName
- c = lastpos("/",CompleteName)
- if c = 0 then c = lastpos(":",CompleteName)
- return left(CompleteName,c)
-
-
-
-